gdk: Don't leak discarded window state event
authorJonas Ådahl <jadahl@gmail.com>
Fri, 11 Mar 2016 05:13:31 +0000 (13:13 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 11 Mar 2016 12:11:34 +0000 (07:11 -0500)
When compressing window state events, we didn't free the discarded
event after removing it from the queue, causing us to leak it. This
commit makes sure to free the discarded event after unqueuing it.

https://bugzilla.gnome.org/show_bug.cgi?id=762468

gdk/gdkevents.c

index a094d4aad3670f3b97c551d957cc146af47b507d..6a6771cf0aed90b15233dcc8a522261ab77db09f 100644 (file)
@@ -2201,6 +2201,7 @@ _gdk_set_window_state (GdkWindow      *window,
     {
       old = window->old_state;
       _gdk_event_queue_remove_link (display, pending_event_link);
+      gdk_event_free (pending_event_link->data);
       g_list_free_1 (pending_event_link);
     }
   else